package org.tobaccomain.service;

import jakarta.servlet.http.HttpServletResponse;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import org.tobaccomain.pojo.dto.DownloadParam;
import org.tobaccomain.pojo.dto.PageTobacco;
import org.tobaccomain.pojo.dto.TobaccoInfo;
import org.tobaccomain.pojo.entity.TobaccoBasic;
import org.tobaccomain.pojo.vo.PageResult;

import java.io.IOException;
import java.util.List;

public interface TobaccoService {

    //添加单料烟基本信息
    void addTobaccoBasic(TobaccoBasic tobaccoBasic);

    //删除单料烟信息
    void delTobacco(TobaccoBasic tobaccoBasic);

    //修改单料烟备注信息
    void modifyTobaccoInfo(TobaccoInfo tobaccoInfo);

    //修改单料烟基本信息
    void modifyTobacco(TobaccoBasic tobaccoBasic);

    //单料烟分页查询
    PageResult getTobaccoList(PageTobacco pageTobacco);

    //根据id获取单料烟备注信息
    TobaccoBasic getTobaccoBasicInfoById(Integer id);

    //单料烟数据导出
    void downloadTobaccoData(DownloadParam param,HttpServletResponse response);

    //单料烟详细数据导入
    void uploadTobaccoDetail(MultipartFile file) throws IOException;

    //根据rfid记录不足的单料烟信息
    @Transactional
    List<TobaccoBasic> recordTobaccoShort(List<Long> rfidList);

    //导出不足单料烟的信息
    void downloadShort(HttpServletResponse response);

    //获取不足的单料烟数据
    List<TobaccoBasic> getTobaccoShort();

    //根据rfid删除不足单料烟信息
    void delTobaccoShort(Long rfid);
}
